package entity

import (
	"manager/model/po"
)

type Setting struct {
	Id int64 `gorm:"column:id;type:BIGINT;primary_key" json:"id"`

	UserId int64 `gorm:"column:user_id;type:BIGINT" json:"user_id"`

	EbikeId int64 `gorm:"column:ebike_id;type:BIGINT" json:"ebike_id"`

	EbikeSet *po.EbikeSet `gorm:"column:ebike_set;type:json" json:"ebike_set"`

	HillAssist int `gorm:"column:hill_assist;type:TINYINT" json:"hill_assist"`

	HillAssistRange int `gorm:"column:hill_assist_range;type:TINYINT" json:"hill_assist_range"`

	FlyCar int `gorm:"column:fly_car;type:TINYINT" json:"fly_car"`

	MsgSet *po.MsgSet `gorm:"column:msg_set;type:json" json:"msg_set"`

	Type int `gorm:"column:type;type:TINYINT" json:"type"`

	CreatedAt int64 `gorm:"column:created_at;type:BIGINT" json:"created_at"`

	UpdatedAt int64 `gorm:"column:updated_at;type:BIGINT" json:"updated_at"`
}

func (a *Setting) TableName() string {
	return "settings"
}
